import { FormProps, FormSchema } from '/@/components/Form';
import type { DynamicProps } from '/#/utils';

type Props = Partial<DynamicProps<FormProps>>;

const fromSchemas: FormSchema[] = [
  {
    field: 'id',
    component: 'Input',
    label: 'ID',
    show: false,
  },
  {
    field: 'code',
    component: 'Input',
    label: '编码',
    colProps: {
      span: 22,
    },
    defaultValue: '',
    required: true,
  },
  {
    field: 'name',
    component: 'Input',
    label: '名称',
    colProps: {
      span: 22,
    },
    required: true,
  },
  {
    field: 'contact_person',
    component: 'Input',
    label: '联系人',
    colProps: {
      span: 22,
    },
  },
  {
    field: 'contact_info',
    component: 'Input',
    label: '联系方式',
    colProps: {
      span: 22,
    },
  },
  {
    field: 'address',
    component: 'Input',
    label: '地址',
    colProps: {
      span: 22,
    },
  },
];

export const fromConfig: Props = {
  labelWidth: 100,
  schemas: fromSchemas,
  showActionButtonGroup: false,
  actionColOptions: {
    span: 24,
  },
};
